]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
viewSelector: Ignore key-presses during non-overview modals
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 12 Nov 2012 17:41:14 +0000 (18:41 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 28 Nov 2012 20:15:09 +0000 (21:15 +0100)
Since commit 0c807bddaf4d, the run dialog no longer handles Escape
key presses itself but uses the action key mechanism of modal dialogs.
As the latter uses key-release events, our own handling of the Escape
key runs on key-press.
Fix this by bailing out early if anything has pushed a modal in addition
to the overview (like system modals, looking glass, ...).

https://bugzilla.gnome.org/show_bug.cgi?id=688196

js/ui/viewSelector.js

index 9c73e8e15e8c3d2279d436e2c60ea3df302b2b32..060c885ea5b7e98d36b134b4849e56fbb7a061dc 100644 (file)
@@ -249,6 +249,11 @@ const ViewSelector = new Lang.Class({
     },
 
     _onStageKeyPress: function(actor, event) {
+        // Ignore events while anything but the overview has
+        // pushed a modal (system modals, looking glass, ...)
+        if (Main.modalCount > 1)
+            return false;
+
         let modifiers = event.get_state();
         let symbol = event.get_key_symbol();